//
//  LzwFiveVebViewVC.m
//  NewHalfsugar
//
//  Created by 刘志武 on 16/1/11.
//  Copyright © 2016年 刘志武. All rights reserved.
//

#import "LzwFiveVebViewVC.h"

@interface LzwFiveVebViewVC ()<UIWebViewDelegate>

@property (nonatomic, retain) UIWebView *myFiveWebView;

@end

@implementation LzwFiveVebViewVC

-(void)dealloc{
    [_myFiveWebView release];
    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.navigationItem.title = @"指尖上的潮生活";
    
    UIImage * LandRightBar = [UIImage imageNamed:@"return.png"];
    LandRightBar = [LandRightBar imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:LandRightBar style:UIBarButtonItemStylePlain target:self action:@selector(leftButtonAction:)];
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.myFiveWebView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, 375 * WIDTH, 667 * WIDTH)];
    [self.view addSubview:self.myFiveWebView];
    
    
    
    NSString *string = self.url;
    
    NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:string]];
    [self.view addSubview: self.myFiveWebView];
    [self.myFiveWebView loadRequest:request];
    
    [self.myFiveWebView setDelegate:self];
    
    [_myFiveWebView release];
    
    
    
    
}

- (void)leftButtonAction:(UIBarButtonItem *)bar{
    
    [self.navigationController popToRootViewControllerAnimated:YES];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
